<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分享二维码</title>
</head>
<body>
<div id="pic">
    <img id="piccontext" src="" height="200" alt="图片在此显示">
</div>
</body>
</html>

<script src="../js/ajax.js"></script>
<script src="../js/vue.js"></script>

<script>
    //读取图片
    let blog_id = window.localStorage.getItem("blogId");
    window.onload=function getPic() {
        ajax({
            method: "post",
            url: "../../browse",
            data: {
                blogId: blog_id,
                code: 4,
            },
            success: function (result) {
                console.log(result);
                let obj = document.getElementById("piccontext");
                obj.src = result['picurl'].replace("]","");
            },
            error: function () {
                alert("数据读取失败");
            }
        })
    }
</script>